home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / source / gutil / length.c < prev    next >
Encoding:
C/C++ Source or Header  |  1985-01-23  |  296 b   |  24 lines

  1. # include    <sccs.h>
  2.  
  3. SCCSID(@(#)length.c    8.1    12/31/84)
  4.  
  5. /*
  6. **  FIND STRING LENGTH
  7. **
  8. **    The length of string `s' (excluding the null byte which
  9. **        terminates the string) is returned.
  10. */
  11.  
  12. length(s)
  13. char    *s;
  14. {
  15.     register int    l;
  16.     register char    *p;
  17.  
  18.     l = 0;
  19.     p = s;
  20.     while (*p++)
  21.         l++;
  22.     return(l);
  23. }
  24.